package com.geek.factory.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 库存预警表
 * </p>
 *
 * @author author
 * @since 2025-07-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("stock_warning")
@ApiModel(value="StockWarning对象", description="库存预警表")
public class StockWarning implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "预警ID，主键自增")
    @TableId(value = "warning_id", type = IdType.AUTO)
    private Integer warningId;

    @ApiModelProperty(value = "物品ID（产品或原料ID）")
    private Integer itemId;

    @ApiModelProperty(value = "物品类型（product=产品/material=原料）")
    private String itemType;

    @ApiModelProperty(value = "物品名称")
    private String itemName;

    @ApiModelProperty(value = "物品编码")
    private String itemCode;

    @ApiModelProperty(value = "预警类型（insufficient=库存不足/excess=库存积压）")
    private String warningType;

    @ApiModelProperty(value = "当前库存数量")
    private BigDecimal currentStock;

    @ApiModelProperty(value = "触发预警的阈值（最小或最大库存）")
    private BigDecimal thresholdValue;

    @ApiModelProperty(value = "计量单位")
    private String unit;

    @ApiModelProperty(value = "预警时间")
    private LocalDateTime warningTime;

    @ApiModelProperty(value = "预警状态（unread=未读/read=已读）")
    private String status;


}
